package pack0701.com;

import java.util.InputMismatchException;
import java.util.Scanner;

public class Student {
    public void speak(int m){
        try{
          //  Scanner s=new Scanner(System.in);
           // m=s.nextInt();
            if(m>1000){
                throw new MyException();
            }
        }catch(InputMismatchException e){
            System.out.println("字母异常");
        }catch( MyException e){
            System.out.println("数字异常: "+m);
        }
        System.out.println("任务结束");


    }

    public static void main(String[] args) {
        Student s=new Student();
        s.speak(50000);
    }

}